﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class UIController : MonoBehaviour
{
    public GameObject uiReward, uiFailed;
    public static UIController instance;

    private void Awake()
    {
        instance = this;
    }

    public void CloseAll()
    {
        uiReward.SetActive(false);
        uiFailed.SetActive(false);
    }

    public void OpenUIReward()
    {
        uiReward.SetActive(true);
        uiReward.GetComponent<UIReward>().Open();
    }

    public void OpenUIFailed()
    {
        uiFailed.SetActive(true);
        uiFailed.GetComponent<UIFailed>().Open();
    }
}